<%-- 
    Document   : RoomResultPage
    Created on : Mar 5, 2015, 9:38:33 AM
    Author     : trang_000
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta name="description" content="<s:property value="pageDescription"/>">
        <title><s:property value="title"/> - Online Dormitory System</title>
        <link href="<%= request.getContextPath()%>/css/style.css" rel="stylesheet" type="text/css"/>
        <link href="<%= request.getContextPath()%>/css/style_for_table.css" rel="stylesheet" type="text/css"/>
    </head>
    <body>
        <div class="headerbg">
            <%@include file="/include/nHeader.jsp" %>
        </div>
        <div class="contentbg">
            <div class="content1">
                <div class="content2">
                    <div class="contentLeft">
                        <div class="categories">
                            <div class="allCat">ALL CATEGORIES</div>
                            <%@include file="/include/nCategories.jsp" %>
                        </div>
                    </div>
                    <div class="contentRight">
                        <div class="body">
                            <div class="breadcrumb">
                                Home - Chambre & Lit
                            </div>
                            <div class="bodyUpper">
                                <h1>Choisir l'étape</h1>
                                 <s:iterator value="productsResultList">
                                    <div class="pSummary">
                                        <div class="pSmallImage">
                                            <a href="<%= request.getContextPath()%>/product/<s:property value='idProduct'/>/<s:property value='name.replaceAll(" ", "-")'/>" title="<s:property value='name + "\r\n" + summary'/>">
                                                <img src="<%= request.getContextPath()%>/<s:property value='imageurl'/>" alt="<s:property value='name'/>" title="<s:property value='name + "\r\n" + summary'/>" width="200" height="auto" />
                                            </a>
                                        </div>
                                        <div class="pSummmaryInfo">
                                            <div class="pName">
                                                <s:property value="name"/>
                                            </div>
                                            <div class="pPrice-was">
                                                $<s:property value="getText('{0,number,#,##0.00}',{unitPrice})"/>
                                            </div>
                                            <div class="pPrice-current">
                                                $<s:property value="getText('{0,number,#,##0.00}',{unitPrice-sale})"/>
                                            </div>
                                            <div class="pAddButton">
                                                <s:if test="%{stockQuantity==0}">
                                                    <img src="<%= request.getContextPath()%>/css/cannotAddToCart.png" title="Currently Out of Stock" alt="Out of Stock" width="25" height="25"/>
                                                </s:if>
                                                <s:else>
                                                    <s:form action="addToCart" method="POST">
                                                        <s:hidden name="productId" value="%{idProduct}"></s:hidden>
                                                        <s:hidden name="productQuantity" value="1"></s:hidden>
                                                        <s:set var="contextPath"><%= request.getContextPath()%></s:set>
                                                        <s:submit type="image" src="%{contextPath}/css/addToCart.png" cssStyle="width: 25px; height: 25px" title="Add this to Cart" theme="simple"/>
                                                    </s:form>
                                                </s:else>
                                            </div>
                                        </div>
                                    </div>
                                </s:iterator>
                            </div>  
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="footerbg">
            <%@include file="/include/iFooter.jsp" %>
        </div>
    </body>
</html>